Skip to content

Conversation

@nickolas-deboom
Copy link
Contributor

@nickolas-deboom nickolas-deboom commented Jan 6, 2026

The optional_capabilities_list_changed function was not properly comparing the new set of supported capabilities with the current set, meaning that a profile update was occurring each time camera_av_stream_management_attribute_list_handler runs. This commit fixes optional_capabilities_list_changed and provides new test cases to ensure that the extraneous profile updates no longer occur.

Tested with Matter SDK Camera example.


if camera_utils.optional_capabilities_list_changed(optional_supported_component_capabilities, device.profile.components) then
device:try_update_metadata({profile = "camera", optional_component_capabilities = optional_supported_component_capabilities})
if #doorbell_endpoints > 0 then
Copy link
Contributor Author

@nickolas-deboom nickolas-deboom Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

button config can be put behind the optional_capabilities_list_changed gate so it doesn't run each time CameraAvStreamManagement.AttributeList is received.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Test Results

   71 files    480 suites   0s ⏱️
2 488 tests 2 488 ✅ 0 💤 0 ❌
4 270 runs  4 270 ✅ 0 💤 0 ❌

Results for commit c914691.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

File Coverage
All files 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/third_reality_mk1/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/capability_handlers.lua 78%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/attribute_handlers.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/device_configuration.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/aqara_cube/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/embedded_cluster_utils.lua 38%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/utils.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/eve_energy/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/init.lua 85%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/event_handlers.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/capability_handlers.lua 89%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/attribute_handlers.lua 85%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against c914691

@nickolas-deboom nickolas-deboom force-pushed the fix/matter-camera-dont-update-profile-unless-optional-capabilities-list-changes branch 2 times, most recently from 784195c to 7f067b7 Compare January 9, 2026 20:05
@nickolas-deboom nickolas-deboom force-pushed the fix/matter-camera-dont-update-profile-unless-optional-capabilities-list-changes branch from b5204a5 to c6c6f67 Compare January 12, 2026 15:31
@nickolas-deboom nickolas-deboom force-pushed the fix/matter-camera-dont-update-profile-unless-optional-capabilities-list-changes branch from c6c6f67 to 6b5ec29 Compare January 12, 2026 16:22
The `optional_capabilities_list_changed` function was not properly
comparing the new set of supported capabilities with the current set,
meaning that a profile update was occurring each time
`camera_av_stream_management_attribute_list_handler` runs. This commit
fixes `optional_capabilities_list_changed` and provides new test cases
to ensure that the extraneous profile updates no longer occur.
@nickolas-deboom nickolas-deboom force-pushed the fix/matter-camera-dont-update-profile-unless-optional-capabilities-list-changes branch from 6b5ec29 to c914691 Compare January 12, 2026 17:10
@nickolas-deboom nickolas-deboom merged commit 1d911f9 into main Jan 12, 2026
11 checks passed
@nickolas-deboom nickolas-deboom deleted the fix/matter-camera-dont-update-profile-unless-optional-capabilities-list-changes branch January 12, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants